package com.tip.dal.dataobject;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class TipDO {
	private Integer id;
	private Date gmtCreate;
	private String name;
	private String tip;
	private String tags;
	private Integer state;
	  
	public String[] getTagsArray()
	{
		if (tags==null)
		{
			return null;
		}
		return tags.split(",");
	}
	public String getTags() {
		return tags;
	}
	public void setTags(String tags) {
		this.tags = tags;
	}
	public Integer getState() {
		return state;
	}
	public void setState(Integer state) {
		this.state = state;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Date getGmtCreate() {
		return gmtCreate;
	}
	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getTip() {
		return tip;
	}
	public void setTip(String tip) {
		this.tip = tip;
	}	
	
	public List<String> getTipByWeb() {
		if (tip == null || tip.length() == 0) {
			return null;
		}
		String[] sp = tip.split("\n");//tip.split("\n")
		List<String> list = new ArrayList<String>();
		for (String s : sp) {
			list.add(s);
		}
		return list;
	}
}
